making the function continuous